]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
workspace: Reset idle hide timeout for overlays on reentry
authorJonas Dreßler <verdre@v0yd.nl>
Tue, 12 Feb 2019 12:04:55 +0000 (13:04 +0100)
committerFlorian Müllner <florian.muellner@gmail.com>
Wed, 18 Sep 2019 15:56:26 +0000 (15:56 +0000)
Instead of returning and waiting until the old timeout is finished,
start a new idle hide timeout for the overlay when the pointer enters a
window clone. This makes sure the timeout for hiding the overlay after
the pointer left the clone mostly stays the same (except when leaving
the clone via the title or the close button).

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/683

js/ui/workspace.js

index 4d1f6511520de7a98eceec5a91f4c2813a37d729..b80aa6c9e71d13d101b3fc1b6a64232f64b0ebbb 100644 (file)
@@ -686,10 +686,11 @@ var WindowOverlay = class {
     }
 
     _onHideChrome() {
-        if (this._idleHideOverlayId == 0) {
-            this._idleHideOverlayId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, WINDOW_OVERLAY_IDLE_HIDE_TIMEOUT, this._idleHideOverlay.bind(this));
-            GLib.Source.set_name_by_id(this._idleHideOverlayId, '[gnome-shell] this._idleHideOverlay');
-        }
+        if (this._idleHideOverlayId == 0)
+            GLib.source_remove(this._idleHideOverlayId);
+
+        this._idleHideOverlayId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, WINDOW_OVERLAY_IDLE_HIDE_TIMEOUT, this._idleHideOverlay.bind(this));
+        GLib.Source.set_name_by_id(this._idleHideOverlayId, '[gnome-shell] this._idleHideOverlay');
     }
 
     _idleHideOverlay() {